package LinkedList_03.Loop_LinkedList_05_Joseph;

/*
 * @Author 罗
 * @date 2020/3/12 - 9:43 下午
 *
 */

public class Child {
    private String name;
    private int id;
    private Child nextNode;
    public Child() {
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public int getId() {
        return id;
    }

    public Child( int id,String name) {
        this.name = name;
        this.id = id;
    }

    public void setNextNode(Child nextNode) {
        this.nextNode = nextNode;
    }

    public Child getNextNode() {
        return nextNode;
    }

    @Override
    public String toString() {
        return "Child{" +
                "name='" + name + '\'' +
                ", id=" + id +
                '}';
    }
}
